import request from '@/utils/request'

// 查询合同项目全部列表
export function projectListAll(params) {
  return request({
    url: '/basic/agreementItem/listing',
    method: 'get',
    params: params,
  })
}

// 分页查询合同项目列表
export function projectList(params) {
  return request({
    url: '/basic/agreementItem/list',
    method: 'get',
    params: params,
  })
}

// 查询合同项目详情
export function projectDetail(agreementItemId) {
  return request({
    url: `/basic/agreementItem/${agreementItemId}`,
    method: 'get',
  })
}

// 新增合同项目
export function projectAdd(data) {
  return request({
    url: `/basic/agreementItem/add`,
    method: 'post',
    data: data
  })
}

// 修改合同项目
export function projectEdit(data) {
  return request({
    url: `/basic/agreementItem/edit`,
    method: 'post',
    data: data
  })
}

// 删除合同项目
export function projectDelete(agreementItemIds) {
  return request({
    url: `/basic/agreementItem/remove/${agreementItemIds}`,
    method: 'get',
  })
}

// 获取合同项目编号
export function genItemNumber(params) {
  return request({
    url: '/basic/agreementItem/genItemNumber',
    method: 'get',
    params: params,
  })
}
